package com.test.group6.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.test.group6.domain.WorkesInformation;

@Mapper
public interface WorkesSelectMapper {

	/**
	 * @author zhang_sguang
	 * @param enterpriseId 第一个参数 企业编号；index 第二个参数 分页展示的页号
	 * @return {@link List<WorkesInformation>}
	 */
	@Select("select id,name,job,sex,birth,education,register_date registerDate,"
			+ "update_date updateDate,enterprise_Id enterpriseId "
			+ "from workes_information where enterprise_Id = #{enterpriseId} "
			+ "order by id ")
	List<WorkesInformation> queryAllWorker(@Param("enterpriseId") String enterpriseId, @Param("index") Integer index);

	/**
	 * @author zhang_sguang
	 * @return 分页展示总页数
	 * @return {@link List<WorkesInformation>}
	 */
	@Select("select count(id) from workes_information")
	Integer queryCount();
}
